<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>用户信息表格</title>
    <link rel="stylesheet" href="../css/users.css">
</head>

<body>
    <div class="container">
        <h1>用户信息表格</h1>
        <table>
            <thead>
                <tr>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>时间</th>
                </tr>
            </thead>
            <tbody>
                <!-- 假设这里通过后端模板引擎填充数据 -->
                <!-- 例如：{% for user in users %}<tr>...</tr>{% endfor %} -->
                <tr>
                    <td>张三</td>
                    <td>男</td>
                    <td>25</td>
                    <td>2023-10-01</td>
                </tr>
                {% for user in users %}
                <tr>
                    <td>user.Name</td>
                    <td>user.Sex</td>
                    <td>user.Age</td>
                    <td>user.time</td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
        <div class="table-controls">
            <div class="pagination">
                <button onclick="prevPage()">上一页</button>
                <span>第 1 页</span>
                <button onclick="nextPage()">下一页</button>
            </div>
            <div class="buttons">
                <button onclick="addUser()">添加学生</button>
                <button onclick="goHome()">返回首页</button>
            </div>
        </div>
    </div>
    <button class="open-popup-btn" onclick="openPopup()">打开导航</button>

    <!-- 弹窗背景遮罩 -->
    <div id="overlay" class="overlay"></div>
    <!-- 弹窗内容 -->
    <div id="popup" class="popup">
        <h2>导航弹窗</h2>
        <a href="">首页</a>
        <button onclick="closePopup()">关闭</button>
    </div>

    <script>
        function addUser() { /* ... */ }
        function goHome() { /* ... */ }

        function openPopup() {
            document.getElementById('overlay').style.display = 'flex';
            document.getElementById('popup').style.display = 'block';
        }
        function closePopup() {
            document.getElementById('overlay').style.display = 'none';
            document.getElementById('popup').style.display = 'none';
        }
        function prevPage() {
            // 实现分页逻辑
            alert('实现上一页逻辑');
        }
        function nextPage() {
            // 实现分页逻辑
            alert('实现下一页逻辑');
        }
    </script>
</body>

</html>